<template>
  <div class="addNewDia" :class="center?'cent':''" >
    <el-dialog
      :title="title"
      :visible.sync="NewVisible"
      :width="width || '1050px'"
      :center="center || false"
      :before-close="closeDia"
      v-el-drag-dialog>
      <slot name="elform"></slot>
      <slot name="body"></slot>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: ["addNewVisible", "center", "title", "width"],
  data() {
    return {
      NewVisible: false,
    };
  },
  mounted() {},
  watch: {
    addNewVisible: function (newVal) {
      this.NewVisible = newVal;
    },
  },
  methods: {
    closeDia() {
      this.$emit("closeDia", false);
      this.NewVisible = false;
    },
  },
};
</script>

<style>
/*.cent .el-dialog__title{*/
/*  background: none !important;*/
/*  text-align: center ;*/
/*  width: 100%;*/
/*  display: block;*/
/*  padding-left: 0;*/
/*}*/
/*.addNewDia .el-form{*/
/*  display: flex;*/
/*  flex-wrap: wrap;*/
/*}*/
/*.addNewDia .el-form .el-form-item{*/
/*  width: 50% ;*/
/*}*/
/*.addNewDia .el-form .el-form-item__label{*/
/*  width: 100px;*/
/*  text-align: center;*/
/*}*/
/*.addNewDia .el-form .el-input__inner{*/
/*  width: 250px;*/
/*}*/
/*.addNewDia .bz{*/
/*  width: 100% !important;*/
/*}*/
/*.addNewDia .el-textarea__inner{*/
/*  height: 80px;*/
/*}*/
/*.iptText{ */
/*  width: 80% !important; */
/*}*/
</style>